package it.webrules.deploymanager.core.dy.jmxutil;

import java.io.IOException;
import java.net.InetAddress;
import java.net.Proxy;
import java.net.Socket;
import java.net.SocketAddress;
import java.net.SocketException;
import java.net.SocketImpl;

public class SocketLessTimeout extends Socket {

	private static final int TIMEOUT = 2000;

	public SocketLessTimeout() {
		super();
	}

	public SocketLessTimeout(InetAddress address, int port, InetAddress localAddr, int localPort) throws IOException {
		super(address, port, localAddr, localPort);
	}

	public SocketLessTimeout(InetAddress address, int port) throws IOException {
		super(address, port);
	}

	public SocketLessTimeout(Proxy proxy) {
		super(proxy);
	}

	public SocketLessTimeout(SocketImpl impl) throws SocketException {
		super(impl);
	}

	public SocketLessTimeout(String host, int port, InetAddress localAddr, int localPort) throws IOException {
		super(host, port, localAddr, localPort);
	}

	public SocketLessTimeout(String host, int port) throws IOException {
		super(host, port);
	}

	@Override
	public void connect(SocketAddress endpoint, int timeout) throws IOException {
		super.connect(endpoint, timeout);
	}

	@Override
	public void connect(SocketAddress endpoint) throws IOException {
		super.connect(endpoint, TIMEOUT);
	}

}
